// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity.p_view;

import android.app.AlertDialog;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor;
import android.net.Uri;
import android.os.Handler;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.webkit.URLUtil;
import android.webkit.WebSettings;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.nnee.p_fk.cls_k;
import com.nnee.p_i.cls_c;
import com.nnee.p_pr.p_a.cls_h;
import com.nnee.p_pr.p_a.cls_i;
import com.nnee.p_pr.p_a.cls_q;
import com.nnee.p_pr.p_a.cls_u;
import com.nnee.p_pr.p_activity.cls_ArticleGalleryActivity;
import com.nnee.p_pr.p_activity.cls_PRISActivityForward;
import com.nnee.p_pr.p_activity.cls_PRISActivitySetting;
import com.nnee.p_pr.p_activity.cls_dc;
import com.nnee.p_pr.p_activity.p_view.WebViews.WebViewAdapter;
import com.nnee.p_pr.p_activity.p_view.WebViews.c;
import com.nnee.p_pr.p_app.cls_PrisApp;
import com.nnee.p_pr.p_atom.cls_b;
import com.nnee.p_pr.p_atom.cls_g;
import com.nnee.p_pr.p_atom.cls_s;
import com.nnee.p_pr.p_atom.cls_z;
import com.nnee.p_pr.p_b.cls_a;
import com.nnee.p_pr.p_c.cls_l;
import com.nnee.p_pr.p_c.cls_m;
import com.nnee.p_pr.p_prot.cls_d;
import com.nnee.p_pr.p_prov.cls_af;
import com.nnee.p_pr.cls_v;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

// Referenced classes of package com.nnee.p_pr.p_activity.view:
//            ah, bp, bb, ag, 
//            ay, bf, be, ae, 
//            ad, ac, ab, bd, 
//            bc, aw, av, ba, 
//            s

public class cls_PrisArticleView extends cls_FrameLayout
    implements cls_ah, bp
{

    public PrisArticleView(Context context)
    {
        super(context);
        y = 0;
        z = 120;
        A = 0;
        B = 0;
        C = 0;
        H = false;
        I = true;
        J = false;
        Z = false;
        aa = 0;
        ab = 1;
        ad = null;
        aj = 0;
        ak = 0;
        al = true;
        am = -1;
        ap = null;
        aq = false;
        g = new bb(this);
        h = new cls_ag(this);
        i = new cls_ay(this);
        at = new cls_bf(this);
        j = new be(this);
        au = new cls_ae(this);
        k = new cls_ad(this);
        av = -1;
        l = new cls_ac(this);
        m = new cls_ab(this);
        ay = new ArrayList();
        az = null;
        aA = null;
        aB = null;
        aC = null;
        aD = null;
        aE = -1;
        E = context;
        aa = 0;
        ah = 0;
        W = null;
        X = new LinkedList();
        Y = new LinkedList();
    }

    public PrisArticleView(Context context, AttributeSet attributeset)
    {
        super(context, attributeset);
        y = 0;
        z = 120;
        A = 0;
        B = 0;
        C = 0;
        H = false;
        I = true;
        J = false;
        Z = false;
        aa = 0;
        ab = 1;
        ad = null;
        aj = 0;
        ak = 0;
        al = true;
        am = -1;
        ap = null;
        aq = false;
        g = new bb(this);
        h = new cls_ag(this);
        i = new cls_ay(this);
        at = new cls_bf(this);
        j = new be(this);
        au = new cls_ae(this);
        k = new cls_ad(this);
        av = -1;
        l = new cls_ac(this);
        m = new cls_ab(this);
        ay = new ArrayList();
        az = null;
        aA = null;
        aB = null;
        aC = null;
        aD = null;
        aE = -1;
        E = context;
        aa = 0;
        W = null;
        X = new LinkedList();
        Y = new LinkedList();
    }

    private String A()
    {
_L2:
        String s1 = null;
_L4:
        return s1;
        if(V == null || V.h == null) goto _L2; else goto _L1
_L1:
        com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)V.h.getFirst();
        if(u1 == null) goto _L2; else goto _L3
_L3:
        s1 = u1.ao();
          goto _L4
    }

    static LinkedList A(PrisArticleView prisarticleview)
    {
        return prisarticleview.Y;
    }

    private void B()
    {
        String s1 = A();
        if(!TextUtils.isEmpty(s1) && U != null)
        {
            com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)U.h.getFirst();
            A = com.nnee.p_pr.cls_v.a().a(s1, u1.V(), "", s.a);
            Y.add(new Integer(A));
        }
    }

    static boolean B(PrisArticleView prisarticleview)
    {
        return prisarticleview.al;
    }

    static int C(PrisArticleView prisarticleview)
    {
        return prisarticleview.ak;
    }

    private void C()
    {
_L2:
        return;
        if(D == null || D.h == null) goto _L2; else goto _L1
_L1:
        com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)D.h.get(ah);
        if(u1 != null)
            a(501, u1, ((String) (null)), ((String) (null)));
        if(true) goto _L2; else goto _L3
_L3:
    }

    private void D()
    {
_L2:
        return;
        if(D == null || D.h == null) goto _L2; else goto _L1
_L1:
        com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)D.h.get(ah);
        if(u1 != null)
            a(502, u1, ((String) (null)), ((String) (null)));
        if(true) goto _L2; else goto _L3
_L3:
    }

    static boolean D(PrisArticleView prisarticleview)
    {
        return prisarticleview.Z;
    }

    private void E()
    {
_L2:
        return;
        if(D == null || D.h == null) goto _L2; else goto _L1
_L1:
        com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)D.h.get(ah);
        if(u1 != null && !u1.u())
        {
            u1.c(true);
            com.nnee.p_pr.c.m.b(E, com.nnee.p_b.p_a.cls_d.h().c(), u1.V());
        }
        if(true) goto _L2; else goto _L3
_L3:
    }

    static void E(PrisArticleView prisarticleview)
    {
        prisarticleview.E();
    }

    static String F(PrisArticleView prisarticleview)
    {
        return prisarticleview.r();
    }

    private void F()
    {
        String s1 = null;
        if(U != null && U.h != null && U.h.getFirst() != null) goto _L2; else goto _L1
_L1:
        return;
_L2:
        String s3;
        String s6;
        com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)U.h.getFirst();
        String s2;
        String s4;
        String s5;
        z az1[];
        if(G())
            s2 = (new StringBuilder()).append(E.getString(0x7f0a00a3)).append(ac.aJ()).toString();
        else
            s2 = u1.U();
        if(!u1.K() || cls_PRISActivitySetting.i(E))
            break; /* Loop/switch isn't completed */
        az1 = u1.aA();
        if(az1 == null || az1.length <= 0)
            break; /* Loop/switch isn't completed */
        s3 = az1[0].g();
_L4:
        s4 = u1.V();
        s5 = u1.b(g.b);
        if(V != null && V.h != null && V.h.getFirst() != null)
        {
            com.nnee.p_pr.p_atom.cls_u u2 = (com.nnee.p_pr.p_atom.u)V.h.getFirst();
            if(!URLUtil.isNetworkUrl(u2.ac()))
                s1 = (new StringBuilder()).append("http://easyread.163.com").append(u2.ac()).toString();
            else
                s1 = u2.ac();
            if(!URLUtil.isNetworkUrl(u2.ar()))
                s6 = (new StringBuilder()).append("http://easyread.163.com").append(u2.ar()).toString();
            else
                s6 = u2.ar();
        } else
        {
            s6 = s1;
        }
        PRISActivityForward.a(E, s2, s4, s1, s6, s5, s3, "\u6B63\u6587Menu", ag);
        if(true) goto _L1; else goto _L3
_L3:
        s3 = s1;
          goto _L4
        if(true) goto _L1; else goto _L5
_L5:
    }

    static cls_d G(PrisArticleView prisarticleview)
    {
        return prisarticleview.V;
    }

    private boolean G()
    {
        boolean flag;
        if((0x400 & af) != 0 || (0x400 & ac.av()) != 0)
            flag = true;
        else
            flag = false;
        return flag;
    }

    static ImageView H(PrisArticleView prisarticleview)
    {
        return prisarticleview.N;
    }

    private String H()
    {
        if(U != null && U.h != null && U.h.getFirst() != null) goto _L2; else goto _L1
_L1:
        String s1 = null;
_L4:
        return s1;
_L2:
        com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)U.h.getFirst();
        StringBuilder stringbuilder = new StringBuilder();
        String s2;
        String s3;
        if(G())
            s2 = (new StringBuilder()).append(E.getString(0x7f0a00a3)).append(ac.aJ()).toString();
        else
            s2 = u1.U();
        if(!TextUtils.isEmpty(s2))
            stringbuilder.append(s2);
        s3 = u1.b(g.b);
        if(!TextUtils.isEmpty(s3))
        {
            if(stringbuilder.length() > 0)
                stringbuilder.append(' ');
            stringbuilder.append(s3);
        }
        if(stringbuilder.length() <= 0)
            continue; /* Loop/switch isn't completed */
        s1 = stringbuilder.toString();
        if(true) goto _L4; else goto _L3
_L3:
        if(true) goto _L1; else goto _L5
_L5:
    }

    static int I(PrisArticleView prisarticleview)
    {
        return prisarticleview.y;
    }

    private void I()
    {
        String s1 = H();
        if(s1 != null)
            a(E, s1);
    }

    static View J(PrisArticleView prisarticleview)
    {
        return prisarticleview.O;
    }

    private String J()
    {
        String s1;
        if(U == null || U.h == null || U.h.getFirst() == null)
        {
            s1 = null;
        } else
        {
            com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)U.h.getFirst();
            if(G())
                s1 = (new StringBuilder()).append(E.getString(0x7f0a00a3)).append(ac.aJ()).toString();
            else
                s1 = u1.U();
        }
        return s1;
    }

    static int K(PrisArticleView prisarticleview)
    {
        return prisarticleview.ab;
    }

    private String K()
    {
        String s1;
        if(U == null || U.h == null || U.h.getFirst() == null)
            s1 = null;
        else
            s1 = ((com.nnee.p_pr.p_atom.u)U.h.getFirst()).b(g.b);
        return s1;
    }

    private String L()
    {
        String s1;
        if(U == null || U.h == null || U.h.getFirst() == null)
            s1 = null;
        else
            s1 = ((com.nnee.p_pr.p_atom.u)U.h.getFirst()).V();
        return s1;
    }

    static String L(PrisArticleView prisarticleview)
    {
        return prisarticleview.ad;
    }

    static int M(PrisArticleView prisarticleview)
    {
        return prisarticleview.aa;
    }

    static void N(PrisArticleView prisarticleview)
    {
        prisarticleview.u();
    }

    static int O(PrisArticleView prisarticleview)
    {
        return prisarticleview.aE;
    }

    static int a(PrisArticleView prisarticleview, int i1)
    {
        prisarticleview.C = i1;
        return i1;
    }

    static Context a(PrisArticleView prisarticleview)
    {
        return prisarticleview.E;
    }

    static cls_d a(PrisArticleView prisarticleview, cls_d d1)
    {
        prisarticleview.V = d1;
        return d1;
    }

    static String a(PrisArticleView prisarticleview, String s1)
    {
        prisarticleview.ad = s1;
        return s1;
    }

    private void a(int i1, Object obj, String s1, String s2)
    {
        i1;
        JVM INSTR lookupswitch 12: default 108
    //                   501: 285
    //                   502: 268
    //                   800: 200
    //                   801: 232
    //                   802: 252
    //                   804: 216
    //                   805: 302
    //                   806: 324
    //                   807: 346
    //                   809: 373
    //                   900: 109
    //                   902: 184;
           goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13
_L11:
        break MISSING_BLOCK_LABEL_373;
_L1:
        return;
_L12:
        aq = false;
        byte byte0;
        if(ak == aj)
            byte0 = 4;
        else
            byte0 = 3;
        A = com.nnee.p_pr.cls_v.a().a((com.nnee.p_pr.p_atom.u)obj, byte0, e());
        B = A;
_L14:
        Y.add(new Integer(A));
        if(true) goto _L1; else goto _L13
_L13:
        A = com.nnee.p_pr.cls_v.a().d(s1, s2);
          goto _L14
_L4:
        A = com.nnee.p_pr.cls_v.a().a(s1, s2);
          goto _L14
_L7:
        A = com.nnee.p_pr.cls_v.a().b(s1, s2);
          goto _L14
_L5:
        A = com.nnee.p_pr.cls_v.a().a((String)obj, s1, s2);
          goto _L14
_L6:
        A = com.nnee.p_pr.cls_v.a().c(s1, s2);
          goto _L14
_L3:
        A = com.nnee.p_pr.cls_v.a().e((com.nnee.p_pr.p_atom.u)obj);
          goto _L14
_L2:
        A = com.nnee.p_pr.cls_v.a().d((com.nnee.p_pr.p_atom.u)obj);
          goto _L14
_L8:
        A = com.nnee.p_pr.cls_v.a().a(s1, aC, ag);
          goto _L14
_L9:
        A = com.nnee.p_pr.cls_v.a().b(s1, aC, ag);
          goto _L14
_L10:
        A = com.nnee.p_pr.cls_v.a().a(s1, aC, ag, (String)obj, null);
          goto _L14
        A = com.nnee.p_pr.cls_v.a().a(s1, aC, ag, s2, false, false);
          goto _L14
    }

    public static void a(Context context, String s1)
    {
        Intent intent = new Intent("android.intent.action.SEND");
        String s2 = context.getString(0x7f0a0080);
        intent.setType("text/plain");
        intent.putExtra("android.intent.extra.TEXT", s1);
        context.startActivity(Intent.createChooser(intent, s2));
    }

    static void a(PrisArticleView prisarticleview, int i1, Object obj, String s1, String s2)
    {
        prisarticleview.a(i1, obj, s1, s2);
    }

    static void a(PrisArticleView prisarticleview, cls_d d1, boolean flag)
    {
        prisarticleview.a(d1, flag);
    }

    static void a(PrisArticleView prisarticleview, cls_d d1, boolean flag, boolean flag1)
    {
        prisarticleview.a(d1, flag, flag1);
    }

    private void a(cls_d d1, boolean flag)
    {
        if(d1 != null && d1.h != null)
        {
            if(flag)
            {
                W.b(d1.h);
            } else
            {
                W.b();
                W.a(d1.h);
            }
            W.a(am);
        }
    }

    private void a(cls_d d1, boolean flag, boolean flag1)
    {
        if(d1 != null && d1.h != null && d1.h.size() != 0) goto _L2; else goto _L1
_L1:
        return;
_L2:
        if(!flag)
        {
            d d3 = U;
            U = d1;
            if(d3 != null && d3 != U)
                d3.k();
        } else
        {
            d d2 = U;
            U = d1;
            if(d2 != null && d2 != U)
                d2.k();
            String s1 = ((com.nnee.p_pr.p_atom.u)d1.h.get(0)).X();
            StringBuilder stringbuilder = new StringBuilder();
            Matcher matcher = q.matcher(s1);
            if(matcher.find())
            {
                stringbuilder.append(s1.substring(0, matcher.start()));
                s1 = s1.substring(matcher.start());
            }
            stringbuilder.append("<script type=\"text/javascript\">function refreshImg(id, imageSrc) {var img = document.getElementById(id);if (null != img) { img.src = imageSrc;}}</script>");
            stringbuilder.append("<meta name=\"viewport\" content=\"initial-scale=1.0,user-scalable=no,target-densityDpi=device-dpi,width=device-width\" />");
            int i1 = cls_PRISActivitySetting.a(cls_PRISActivitySetting.g(E));
            String s2 = s;
            Object aobj[] = new Object[3];
            aobj[0] = Integer.valueOf(j(i1));
            String s3;
            String s4;
            if(cls_PRISActivitySetting.i(E))
                s3 = "NO_IMAGE";
            else
                s3 = "NORMAL";
            aobj[1] = s3;
            if(cls_PRISActivitySetting.j(E))
                s4 = "NIGHT";
            else
                s4 = "";
            aobj[2] = s4;
            stringbuilder.append(String.format(s2, aobj));
            stringbuilder.append(s1);
            F.scrollTo(0, 0);
            F.loadDataWithBaseURL("file:///android_asset/", stringbuilder.toString(), "text/html", "UTF-8", null);
            F.requestLayout();
            C = 1 + C;
        }
        if(true) goto _L1; else goto _L3
_L3:
    }

    static boolean a(PrisArticleView prisarticleview, boolean flag)
    {
        prisarticleview.aq = flag;
        return flag;
    }

    static int b(PrisArticleView prisarticleview, int i1)
    {
        prisarticleview.ai = i1;
        return i1;
    }

    static String b(PrisArticleView prisarticleview)
    {
        return prisarticleview.ar;
    }

    static String b(PrisArticleView prisarticleview, String s1)
    {
        prisarticleview.aD = s1;
        return s1;
    }

    static void b(PrisArticleView prisarticleview, cls_d d1)
    {
        prisarticleview.b(d1);
    }

    static void b(PrisArticleView prisarticleview, boolean flag)
    {
        prisarticleview.c(flag);
    }

    private void b(cls_d d1)
    {
_L2:
        return;
        if(d1 == null || d1.h == null) goto _L2; else goto _L1
_L1:
        com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)d1.h.get(0);
        if(u1 != null)
        {
            String s1 = u1.b(g.d);
            if(s1 != null)
            {
                if(!URLUtil.isNetworkUrl(s1))
                    s1 = (new StringBuilder()).append("http://easyread.163.com").append(s1).toString();
                if(I)
                    L.setVisibility(0);
                J = true;
                a(800, null, s1, u1.V());
            }
        }
        if(true) goto _L2; else goto _L3
_L3:
    }

    static int c(PrisArticleView prisarticleview, int i1)
    {
        prisarticleview.A = i1;
        return i1;
    }

    static cls_d c(PrisArticleView prisarticleview)
    {
        return prisarticleview.U;
    }

    private void c(boolean flag)
    {
        if(flag)
        {
            P.setVisibility(0);
            Q.setVisibility(0);
            S.setText(0x7f0a009d);
        } else
        {
            P.setVisibility(8);
        }
    }

    static boolean c(PrisArticleView prisarticleview, boolean flag)
    {
        prisarticleview.Z = flag;
        return flag;
    }

    static int d(PrisArticleView prisarticleview, int i1)
    {
        prisarticleview.y = i1;
        return i1;
    }

    static String d(PrisArticleView prisarticleview)
    {
        return prisarticleview.ao;
    }

    static boolean d(PrisArticleView prisarticleview, boolean flag)
    {
        prisarticleview.H = flag;
        return flag;
    }

    static int e(PrisArticleView prisarticleview, int i1)
    {
        prisarticleview.z = i1;
        return i1;
    }

    static String e(PrisArticleView prisarticleview)
    {
        return prisarticleview.an;
    }

    static boolean e(PrisArticleView prisarticleview, boolean flag)
    {
        prisarticleview.J = flag;
        return flag;
    }

    static int f(PrisArticleView prisarticleview)
    {
        return prisarticleview.ah;
    }

    static int f(PrisArticleView prisarticleview, int i1)
    {
        prisarticleview.ab = i1;
        return i1;
    }

    private void f(int i1)
    {
        StringBuilder stringbuilder = new StringBuilder();
        stringbuilder.append("javascript:pris.updateFontLevel('");
        stringbuilder.append(j(i1));
        stringbuilder.append("')");
        F.loadUrl(stringbuilder.toString());
    }

    private boolean f(String s1)
    {
        boolean flag;
        if(V == null)
            flag = false;
        else
        if(V.h == null)
        {
            flag = false;
        } else
        {
            com.nnee.p_pr.p_atom.cls_u u1 = (com.nnee.p_pr.p_atom.u)V.h.getFirst();
            if(u1 == null)
                flag = false;
            else
            if(TextUtils.isEmpty(u1.ac()))
            {
                com.nnee.p_pr.p_a.cls_h.a(E, 0x7f0a00a2);
                flag = false;
            } else
            {
                a(801, u1.ac(), u1.V(), s1);
                flag = true;
            }
        }
        return flag;
    }

    static int g(PrisArticleView prisarticleview)
    {
        return prisarticleview.ae;
    }

    static void g(PrisArticleView prisarticleview, int i1)
    {
        prisarticleview.k(i1);
    }

    private void g(String s1)
    {
        Cursor cursor;
        aA = J();
        aB = K();
        aC = L();
        Context context = E;
        Object aobj[] = new Object[1];
        String s2;
        String s3;
        int i1;
        String s4;
        if(aA == null)
            s2 = "";
        else
            s2 = aA;
        aobj[0] = s2;
        s3 = context.getString(0x7f0a0157, aobj);
        if(s3.length() > 119)
            i1 = 119;
        else
            i1 = s3.length();
        s4 = s3.substring(0, i1);
        if(i1 < 119)
        {
            boolean flag;
            int j1;
            if(s1.length() > 119 - i1)
                j1 = 119 - i1;
            else
                j1 = s1.length();
            az = s1.substring(0, j1);
            az = (new StringBuilder()).append(az).append(s4).toString();
        } else
        {
            az = s4;
        }
        cursor = com.nnee.p_pr.p_c.cls_l.a(E);
        if(cursor == null) goto _L2; else goto _L1
_L1:
        flag = cursor.moveToFirst();
        if(flag) goto _L3; else goto _L2
_L2:
        if(cursor != null)
            cursor.close();
_L5:
        return;
_L3:
        ay.clear();
        boolean flag1;
        do
        {
            ay.add(Long.valueOf(cursor.getLong(0)));
            flag1 = cursor.moveToNext();
        } while(flag1);
        if(cursor != null)
            cursor.close();
        Exception exception;
        if(ag == b.a)
            aE = com.nnee.p_pr.cls_v.a().g(aC);
        else
        if(!TextUtils.isEmpty(aB))
            aE = com.nnee.p_pr.cls_v.a().h(aB);
        else
            k(1);
        if(true) goto _L5; else goto _L4
_L4:
        exception;
        if(cursor != null)
            cursor.close();
        throw exception;
    }

    static WebViewAdapter h(PrisArticleView prisarticleview)
    {
        return prisarticleview.F;
    }

    static int i(PrisArticleView prisarticleview)
    {
        return prisarticleview.C;
    }

    private void i()
    {
        F.d();
    }

    private int j(int i1)
    {
        byte byte0 = 4;
        i1;
        JVM INSTR tableswitch 0 3: default 32
    //                   0 34
    //                   1 40
    //                   2 32
    //                   3 45;
           goto _L1 _L2 _L3 _L1 _L4
_L1:
        return byte0;
_L2:
        byte0 = 6;
        continue; /* Loop/switch isn't completed */
_L3:
        byte0 = 5;
        continue; /* Loop/switch isn't completed */
_L4:
        byte0 = 2;
        if(true) goto _L1; else goto _L5
_L5:
    }

    static int j(PrisArticleView prisarticleview)
    {
        int i1 = prisarticleview.C;
        prisarticleview.C = i1 + 1;
        return i1;
    }

    private void j()
    {
        bd bd1 = new bd(this);
        F.d();
        F.a(bd1);
    }

    private void k()
    {
        cls_bc bc1 = new bc(this);
        F.d();
        F.a(bc1);
    }

    private void k(int i1)
    {
        if(m != null)
            m.sendEmptyMessage(i1);
    }

    static boolean k(PrisArticleView prisarticleview)
    {
        return prisarticleview.I;
    }

    static LinearLayout l(PrisArticleView prisarticleview)
    {
        return prisarticleview.L;
    }

    private void l()
    {
        aw aw1 = new cls_aw(this);
        F.d();
        F.a(aw1);
    }

    static View m(PrisArticleView prisarticleview)
    {
        return prisarticleview.M;
    }

    private void m()
    {
        if(F != null)
        {
            G = F.getSettings();
            F.setWebViewClient(g);
            F.setScrollBarStyle(0x2000000);
            F.a(new cls_av(this));
            F.a(new cls_ba(this));
            G.setJavaScriptEnabled(true);
            G.setPluginsEnabled(true);
        }
    }

    static int n(PrisArticleView prisarticleview)
    {
        return prisarticleview.q();
    }

    private void n()
    {
        N = (ImageView)findViewById(0x7f0d0067);
        K = (RelativeLayout)findViewById(0x7f0d0066);
        F = com.nnee.p_pr.p_activity.p_view.WebViews.c.a(getContext());
        F.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-1, -1));
        F.setBackgroundColor(com.nnee.p_fk.cls_k.a(E).c(0x7f0800a4));
        K.addView(F, 0);
        L = (LinearLayout)findViewById(0x7f0d006a);
        M = findViewById(0x7f0d0069);
        T = (ListView)findViewById(0x7f0d0068);
        O = LayoutInflater.from(E).inflate(0x7f030008, null);
        T.addFooterView(O);
        P = (LinearLayout)O.findViewById(0x7f0d001a);
        Q = (ProgressBar)O.findViewById(0x7f0d001b);
        S = (TextView)O.findViewById(0x7f0d001c);
        T.setDivider(null);
        T.setDividerHeight(0);
        View view = LayoutInflater.from(E).inflate(0x7f030020, null);
        R = (TextView)view.findViewById(0x7f0d0060);
        T.addHeaderView(view, null, false);
    }

    static b o(PrisArticleView prisarticleview)
    {
        return prisarticleview.ag;
    }

    private void o()
    {
        if(W == null)
        {
            W = new com.nnee.p_pr.p_activity.a.m(E);
            W.a(X);
            W.a(au);
        }
        if(T != null)
            T.setAdapter(W);
    }

    static int p(PrisArticleView prisarticleview)
    {
        return prisarticleview.aj;
    }

    private void p()
    {
        if(T != null)
        {
            T.setOnScrollListener(j);
            T.setOnItemLongClickListener(at);
        }
    }

    private int q()
    {
        byte byte0;
        if(ak == aj)
            byte0 = 4;
        else
            byte0 = 3;
        return byte0;
    }

    static void q(PrisArticleView prisarticleview)
    {
        prisarticleview.i();
    }

    private String r()
    {
        StringBuilder stringbuilder = new StringBuilder();
        stringbuilder.append("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">");
        stringbuilder.append("<meta name=\"viewport\" content=\"initial-scale=1.0,user-scalable=no,target-densityDpi=device-dpi,width=device-width\" />");
        stringbuilder.append("<span style=\"position:absolute;left:50%;top:50%;text-align:center;font-size:20px;width:260px;height:20px;margin-top:-10px;margin-left:-130px;color:");
        int i1 = com.nnee.p_fk.cls_k.a(E).c(0x7f080110);
        Object aobj[] = new Object[1];
        aobj[0] = Integer.valueOf(i1 & 0xffffff);
        stringbuilder.append(String.format("#%06x", aobj));
        Object aobj1[] = new Object[1];
        aobj1[0] = getResources().getString(0x7f0a0218);
        stringbuilder.append(String.format("\">%s</span>", aobj1));
        return stringbuilder.toString();
    }

    static void r(PrisArticleView prisarticleview)
    {
        prisarticleview.j();
    }

    private void s()
    {
        if(ad != null && U != null && U.h.get(0) != null)
        {
            J = true;
            a(804, null, ad, ((com.nnee.p_pr.p_atom.u)U.h.get(0)).V());
            T.addFooterView(O);
            c(true);
        }
    }

    static void s(PrisArticleView prisarticleview)
    {
        prisarticleview.k();
    }

    private void t()
    {
        android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(E);
        builder.setItems(0x7f070014, i);
        builder.create().show();
    }

    static void t(PrisArticleView prisarticleview)
    {
        prisarticleview.l();
    }

    static int u(PrisArticleView prisarticleview)
    {
        return prisarticleview.ai;
    }

    private void u()
    {
        if(com.nnee.p_pr.p_a.cls_i.a(com.nnee.p_pr.p_b.cls_a.o(), 20, 20))
            dc.b(E, 1);
    }

    static com.nnee.p_pr.p_activity.a.m v(PrisArticleView prisarticleview)
    {
        return prisarticleview.W;
    }

    private boolean v()
    {
        boolean flag;
        flag = false;
        break MISSING_BLOCK_LABEL_2;
        if((L == null || L.getVisibility() != 0) && aq)
            flag = true;
        return flag;
    }

    static ListView w(PrisArticleView prisarticleview)
    {
        return prisarticleview.T;
    }

    private boolean w()
    {
        boolean flag;
        if(F != null && F.p())
            flag = true;
        else
            flag = false;
        return flag;
    }

    private String x()
    {
        if(U != null) goto _L2; else goto _L1
_L1:
        String s1 = null;
_L4:
        return s1;
_L2:
        com.nnee.p_pr.p_atom.cls_u u1;
        if(U.h.size() > 0)
            u1 = (com.nnee.p_pr.p_atom.u)U.h.getFirst();
        else
            u1 = null;
        if(u1 == null)
            continue; /* Loop/switch isn't completed */
        s1 = u1.b(g.b);
        if(true) goto _L4; else goto _L3
_L3:
        if(true) goto _L1; else goto _L5
_L5:
    }

    static void x(PrisArticleView prisarticleview)
    {
        prisarticleview.t();
    }

    private void y()
    {
        String s1;
        s1 = x();
        if(TextUtils.isEmpty(s1))
            break MISSING_BLOCK_LABEL_35;
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(s1));
        E.startActivity(intent);
_L1:
        return;
        Exception exception;
        exception;
        exception.printStackTrace();
          goto _L1
    }

    static boolean y(PrisArticleView prisarticleview)
    {
        return prisarticleview.J;
    }

    private void z()
    {
        F.a();
    }

    static void z(PrisArticleView prisarticleview)
    {
        prisarticleview.s();
    }

    public int a()
    {
        return ah;
    }

    public Object a(int i1, int j1, Object obj)
    {
        Object obj1;
        if(j1 == cls_ArticleGalleryActivity.k)
            obj1 = Boolean.valueOf(H);
        else
        if(j1 == cls_ArticleGalleryActivity.q)
            obj1 = Integer.valueOf(y);
        else
        if(j1 == cls_ArticleGalleryActivity.u)
            obj1 = Integer.valueOf(aa);
        else
        if(j1 == cls_ArticleGalleryActivity.x)
            obj1 = x();
        else
        if(j1 == cls_ArticleGalleryActivity.l)
            obj1 = A();
        else
        if(j1 == cls_ArticleGalleryActivity.n)
            obj1 = H();
        else
        if(j1 == cls_ArticleGalleryActivity.A)
            obj1 = Boolean.valueOf(w());
        else
        if(j1 == cls_ArticleGalleryActivity.B)
            obj1 = Boolean.valueOf(v());
        else
        if(j1 == cls_ArticleGalleryActivity.D)
            obj1 = Integer.valueOf(z);
        else
        if(j1 == cls_ArticleGalleryActivity.E)
            obj1 = J();
        else
            obj1 = null;
        return obj1;
    }

    public void a(int i1)
    {
        ah = i1;
    }

    public void a(int i1, int j1)
    {
        ak = i1;
        aj = j1;
    }

    public void a(int i1, boolean flag)
    {
    }

    public void a(com.nnee.p_pr.p_activity.p_view.s s1)
    {
        ap = s1;
    }

    public void a(cls_b b1)
    {
        ag = b1;
    }

    public void a(com.nnee.p_pr.p_atom.cls_u u1)
    {
        ac = u1;
    }

    public void a(cls_d d1)
    {
        D = d1;
    }

    public void a(boolean flag)
    {
        al = flag;
    }

    public boolean a(String s1)
    {
        return false;
    }

    public d b()
    {
        return D;
    }

    public void b(int i1)
    {
        ae = i1;
    }

    public void b(com.nnee.p_pr.p_activity.p_view.s s1)
    {
        ap = s1;
    }

    public void b(boolean flag)
    {
        as = flag;
    }

    public boolean b(int i1, int j1, Object obj)
    {
        boolean flag;
        if(j1 == cls_ArticleGalleryActivity.i)
            C();
        else
        if(j1 == cls_ArticleGalleryActivity.j)
            D();
        else
        if(j1 == cls_ArticleGalleryActivity.l)
            B();
        else
        if(j1 == cls_ArticleGalleryActivity.m)
            F();
        else
        if(j1 == cls_ArticleGalleryActivity.n)
            I();
        else
        if(j1 == cls_ArticleGalleryActivity.o)
            f((String)obj);
        else
        if(j1 == cls_ArticleGalleryActivity.p)
            f(((Integer)obj).intValue());
        else
        if(j1 == cls_ArticleGalleryActivity.r)
        {
            K.setVisibility(((Integer)obj).intValue());
            if(((Integer)obj).intValue() == 0)
                aa = 0;
        } else
        if(j1 == cls_ArticleGalleryActivity.s)
        {
            T.setVisibility(((Integer)obj).intValue());
            if(((Integer)obj).intValue() == 0)
                aa = 1;
        } else
        if(j1 == cls_ArticleGalleryActivity.t)
        {
            ab = 1;
            ad = null;
            if(W != null)
                W.b();
            b(U);
            R.setText(ac.U());
        } else
        if(j1 == cls_ArticleGalleryActivity.v)
        {
            com.nnee.p_pr.cls_v.a().a(e());
            com.nnee.p_img.cls_d.a().a(e());
        } else
        if(j1 == cls_ArticleGalleryActivity.x)
            y();
        else
        if(j1 == cls_ArticleGalleryActivity.y)
        {
            z();
        } else
        {
label0:
            {
                if(j1 != cls_ArticleGalleryActivity.C)
                    break label0;
                g((String)obj);
            }
        }
        flag = true;
_L2:
        return flag;
        flag = false;
        if(true) goto _L2; else goto _L1
_L1:
    }

    public boolean b(String s1)
    {
        return false;
    }

    protected String c()
    {
        return (new StringBuilder()).toString();
    }

    public void c(int i1)
    {
        af = i1;
    }

    public void c(int i1, int j1, Object obj)
    {
        if(ap != null && ak == i1)
            ap.a(i1, j1, obj);
    }

    public void c(String s1)
    {
        an = s1;
    }

    public void d()
    {
        am = com.nnee.p_pr.v.b();
    }

    public void d(int i1)
    {
        am = i1;
    }

    public void d(String s1)
    {
        ao = s1;
    }

    public int e()
    {
        return am;
    }

    public void e(int i1)
    {
        boolean flag = true;
        if(ak != i1) goto _L2; else goto _L1
_L1:
        return;
_L2:
        ak = i1;
        if(ak == aj)
        {
            cls_d d1;
            if(H)
                c(aj, cls_ArticleGalleryActivity.i, Boolean.valueOf(flag));
            else
                c(aj, cls_ArticleGalleryActivity.j, Boolean.valueOf(false));
            c(aj, cls_ArticleGalleryActivity.q, Integer.valueOf(y));
            c(aj, cls_ArticleGalleryActivity.w, Integer.valueOf(aa));
            if(U != null && !Z)
            {
                Z = flag;
                E();
            }
        }
        if(!al)
        {
            d1 = U;
            if(ak != aj)
                flag = false;
            a(d1, flag, false);
        }
        if(F != null)
            F.invalidate();
        if(true) goto _L1; else goto _L3
_L3:
    }

    public void e(String s1)
    {
        ar = s1;
    }

    public void f()
    {
        if(e() > 0)
        {
            com.nnee.p_pr.cls_v.a().a(e());
            com.nnee.p_img.cls_d.a().a(e());
        }
    }

    protected void g()
    {
    }

    public void g(int i1)
    {
        aa = 0;
        H = false;
        y = 0;
        z = 120;
        U = null;
        V = null;
        N.setVisibility(8);
        K.setVisibility(0);
        T.setVisibility(8);
        Y.clear();
        h.a();
        Z = false;
        com.nnee.p_pr.cls_v.a().a(k);
        if(I)
        {
            if(as)
                M.setVisibility(8);
            else
                M.setVisibility(0);
            L.setVisibility(0);
        }
        if(F != null)
        {
            F.clearHistory();
            F.stopLoading();
            F.loadUrl("about:blank");
            C = 0;
        }
        f();
        d();
        if(ac != null)
            a(900, ac, ((String) (null)), ((String) (null)));
    }

    protected void h()
    {
        ArrayList arraylist = ay;
        arraylist;
        JVM INSTR monitorenter ;
        Cursor cursor;
        if(ay.size() <= 0)
            break MISSING_BLOCK_LABEL_471;
        long l1 = ((Long)ay.remove(-1 + ay.size())).longValue();
        cursor = E.getContentResolver().query(ContentUris.withAppendedId(af.k, l1), l.a, null, null, null);
        if(cursor != null && cursor.moveToFirst()) goto _L2; else goto _L1
_L1:
        k(1);
_L5:
        if(cursor != null)
            cursor.close();
_L8:
        arraylist;
        JVM INSTR monitorexit ;
        return;
_L2:
        av = cursor.getInt(4);
        if(TextUtils.isEmpty(aD)) goto _L4; else goto _L3
_L3:
        String s1 = (new StringBuilder()).append(az).append(" ").append(aD).toString();
_L6:
        String s2;
        if(av != 5)
            break MISSING_BLOCK_LABEL_257;
        if(!TextUtils.isEmpty(aA))
            break MISSING_BLOCK_LABEL_248;
        s2 = E.getString(0x7f0a01e8);
_L7:
        if(s2.length() > 30)
            s2.substring(0, 30);
        aB;
        com.nnee.p_b.p_b.p_a.cls_b.a().a(cursor.getString(2), s1, null, l);
          goto _L5
        Exception exception;
        exception;
        throw exception;
_L4:
        s1 = az;
          goto _L6
        s2 = aA;
          goto _L7
        if(av == 1)
            com.nnee.p_b.p_b.p_f.cls_a.a().a(cursor.getString(2), s1, null, null, null, null, l);
        else
        if(av == 3)
            com.nnee.p_b.p_b.p_g.cls_c.a().a(cursor.getString(2), s1, null, null, null, l);
        else
        if(av == 4)
            com.nnee.p_b.p_b.p_b.cls_a.a().a(cursor.getString(2), s1, null, l);
        else
        if(av == 2)
            com.nnee.p_b.p_b.p_d.cls_c.a().a(cursor.getString(2), s1, null, null, null, l);
        else
        if(av == 6)
            com.nnee.p_b.p_b.p_c.cls_a.a().a(cursor.getString(2), s1, null, l);
        else
        if(av == 7)
            com.nnee.p_b.p_b.p_h.cls_d.a().a(cursor.getString(2), s1, null, null, null, null, null, null, null, null, l);
          goto _L5
        k(2);
          goto _L8
    }

    public void h(int i1)
    {
    }

    public void i(int i1)
    {
        if(aj != i1) goto _L2; else goto _L1
_L1:
        com.nnee.p_pr.cls_v.a().a(B, 4);
        if(e() > 0)
            com.nnee.p_img.cls_d.a().a(e(), 4);
_L4:
        return;
_L2:
        com.nnee.p_pr.cls_v.a().a(B, 3);
        if(e() > 0)
            com.nnee.p_img.cls_d.a().a(e(), 2);
        if(true) goto _L4; else goto _L3
_L3:
    }

    protected void onAttachedToWindow()
    {
        super.onAttachedToWindow();
        com.nnee.p_pr.cls_v.a().a(k);
    }

    protected void onDetachedFromWindow()
    {
        com.nnee.p_pr.cls_v.a().b(k);
        if(h != null)
        {
            h.b();
            h = null;
        }
        if(k != null)
            k = null;
        if(Q != null)
            Q.setVisibility(8);
        if(P != null)
            P.setVisibility(8);
        if(F != null)
        {
            F.destroy();
            F = null;
        }
        if(W != null)
        {
            if(W instanceof  com.nnee.p_pr.p_activity.a.m)
                W.b();
            W = null;
        }
        if(X != null)
        {
            X.clear();
            X = null;
        }
        if(Y != null)
            Y.clear();
        if(V != null)
        {
            V.k();
            V = null;
        }
        if(U != null)
        {
            U.k();
            U = null;
        }
        if(T != null)
            T = null;
        if(D != null)
            D = null;
        if(ac != null)
            ac = null;
        if(ad != null)
            ad = null;
        if(g != null)
            g = null;
        if(ay != null)
        {
            ay.clear();
            ay = null;
        }
        if(m != null)
        {
            m.removeMessages(1);
            m.removeMessages(2);
            m = null;
        }
        if(E != null)
            E = null;
        G = null;
        K = null;
        N = null;
        L = null;
        M = null;
        O = null;
        P = null;
        Q = null;
        S = null;
        an = null;
        ar = null;
        E = null;
        super.onDetachedFromWindow();
    }

    protected void onFinishInflate()
    {
        super.onFinishInflate();
        n();
        m();
        o();
        p();
    }

    public static final int a = 0;
    private static final int aw = 1;
    private static final int ax = 2;
    public static final int b = 1;
    public static final int c = 0;
    public static final int d = 1;
    public static final int e = 0;
    public static final int f = 1;
    private static final boolean n = false;
    private static final String o = "PrisArticleView";
    private static final int p = 119;
    private static Pattern q = Pattern.compile("<(?i)html(\\s|>)");
    private static final int r[];
    private static final String s;
    private static final String t = "<script type=\"text/javascript\">function refreshImg(id, imageSrc) {var img = document.getElementById(id);if (null != img) { img.src = imageSrc;}}</script>";
    private static final String u = "<meta name=\"viewport\" content=\"initial-scale=1.0,user-scalable=no,target-densityDpi=device-dpi,width=device-width\" />";
    private static final String v = "NORMAL";
    private static final String w = "NO_IMAGE";
    private static final String x = "NIGHT";
    private int A;
    private int B;
    private int C;
    private cls_d D;
    private Context E;
    private WebViewAdapter F;
    private WebSettings G;
    private boolean H;
    private boolean I;
    private boolean J;
    private RelativeLayout K;
    private LinearLayout L;
    private View M;
    private ImageView N;
    private View O;
    private LinearLayout P;
    private ProgressBar Q;
    private TextView R;
    private TextView S;
    private ListView T;
    private cls_d U;
    private cls_d V;
    private com.nnee.p_pr.p_activity.a.m W;
    private LinkedList X;
    private LinkedList Y;
    private boolean Z;
    private String aA;
    private String aB;
    private String aC;
    private String aD;
    private int aE;
    private int aa;
    private int ab;
    private com.nnee.p_pr.p_atom.cls_u ac;
    private String ad;
    private int ae;
    private int af;
    private b ag;
    private int ah;
    private int ai;
    private int aj;
    private int ak;
    private boolean al;
    private int am;
    private String an;
    private String ao;
    private com.nnee.p_pr.p_activity.p_view.s ap;
    private boolean aq;
    private String ar;
    private boolean as;
    private android.widget.AdapterView.OnItemLongClickListener at;
    private android.view.View.OnClickListener au;
    private int av;
    private ArrayList ay;
    private String az;
    WebViewClient g;
    ag h;
    android.content.DialogInterface.OnClickListener i;
    android.widget.AbsListView.OnScrollListener j;
    com.nnee.p_pr.cls_b k;
    com.nnee.p_b.p_b.p_e.cls_d l;
    Handler m;
    private int y;
    private int z;

    static 
    {
        r = com.nnee.p_pr.a.u.l(cls_PrisApp.a().getApplicationContext());
        s = (new StringBuilder()).append("<script type=\"text/javascript\">window.pris = {device:\"android\", version:\"").append(com.nnee.p_pr.p_a.cls_e.b(cls_PrisApp.a().getApplicationContext())).append("\",").append(" sdk_version: \"").append(com.nnee.p_pr.p_a.cls_q.a()).append("\",").append(" lang : \"").append(com.nnee.p_pr.a.u.r(cls_PrisApp.a().getApplicationContext())).append("\",").append(" protocol: \"").append("1.0.1").append("\",").append(" width: \"").append(r[0]).append("\",").append(" height: \"").append(r[1]).append("\",").append(" fontLevel : %d ,").append(" mode : \"%s\",").append(" density : \"").append(com.nnee.p_pr.a.u.k(cls_PrisApp.a().getApplicationContext())).append("\",").append(" nightMode : \"%s\"}; ").append("</script>").toString();
    }
}
